package work.chenbo.spring_boot_shiro.modules.sys_user.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import work.chenbo.spring_boot_shiro.modules.sys_user.entity.SysUser;
import work.chenbo.spring_boot_shiro.modules.sys_user.vo.UserQO;

public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 通过用户名查询用户
     * @author ChenBo
     * @date 2019/10/28
     */
    SysUser findByUserName(@Param("userName") String userName);

    /**
     * 带参数分页查询
     * @author ChenBo
     * @date 2019/10/30
     */
    IPage<SysUser> selectByPage(Page page,@Param("qo") UserQO qo);

    /**
     * 根据ID查询用户
     * @param id
     * @return
     */
    SysUser findById(@Param("id") Integer id);
}